#ifndef __HEADFILE_H__
#define __HEADFILE_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>

#define USER_INT0 0x00 // PPM
#define USER_INT1 0x20 // UART2
#define USER_INT2 0x40 // UART3
                       // UART1
#define USER_INT3 0x60 // UART0
#define USER_INT4 0x80 // UART6
#define USER_INT5 0xA0 // UART7
#define USER_INT6 0xC0 // TIMER0
#define USER_INT7 0xE0 // TIMER2

#define ABS(X) (((X) > 0) ? (X) : -(X))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define Imu_Sampling_Freq 200
#define WP_Duty_Freq 200
#define WP_Duty_Dt (1.0f / WP_Duty_Freq)
#define WP_Duty_Dt_Ms (WP_Duty_Dt * 1000)
#define Delta WP_Duty_Dt

typedef signed char int8;
typedef unsigned char u8;
typedef unsigned char uint8;
typedef unsigned char byte;
typedef signed short int int16;
typedef unsigned short int uint16;
typedef unsigned short int u16;
typedef unsigned long int u32;

#include "hw_memmap.h"
#include "hw_types.h"
#include "hw_ints.h"
#include "debug.h"
#include "fpu.h"
#include "gpio.h"
#include "pin_map.h"
#include "pwm.h"
#include "rom.h"
#include "sysctl.h"
#include "uart.h"
#include "interrupt.h"
#include "timer.h"
#include "hw_gpio.h"
#include "eeprom.h"
/////////////////////////
#include "WP_DataType.h"
#include "Usart.h"
#include "uartstdio.h"
#include "Time.h"
#include "Time_Cnt.h"
#include "Schedule.h"
#include "License.h"
#include "ssd1306.h"
#include "oled.h"
#include "LCD_ST7789.h"
#include "Soft_I2C.h"
#include "wp_flash.h"
#include "Ringbuf.h"
#include "WP_PWM.h"
#include "Key.h"
#include "WP_ADC.h"
#include "Bling.h"
#include "SYSTEM.h"
#include "BlueTooth.h"
#include "bsp_ir_chip.h"
#include "InfraRedCtl.h"
#include "DHT11.h"
#include "UsartHMI.h"
#include "MQTTPacket.h"

#endif
